import axios, {AxiosResponse} from "axios";
import {defineExpose} from "vue";
import {ServerHost} from "@/main";

export const downloadImg =  (name: string, path: string): Promise<AxiosResponse<any, any>> => {
    return axios.get(`${ServerHost}/getFile`, {
        responseType: 'blob',
        params: {
            "name": name,
            "path": path
        }
    })
}

defineExpose({
    downloadImg
})
